package com.iot.custom.page;

import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author lzb22
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
public class PageExtra {
    Long total;
    Long size;
    Long page;

    public PageExtra(IPage<?> page) {
        this.total = page.getTotal();
        this.size = page.getSize();
        this.page = page.getCurrent();
    }
}
